﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using OF.Component.BLL;
using OF.Component.Model;
using OF.Utility;
using OpSystem.manage;
using OpSystem.common;

namespace OpSystem.Manage.authority
{
    public partial class AuthorityRoleList : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            CheckPageCode("10103");
            if (!Page.IsPostBack)
            {
                MyBind();
            }
        }


        private void MyBind()
        {
            int pageCount = 0;
            IList<AuthorityRoleInfo> list = AuthorityRoleOperate.Search(out pageCount, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, " IsActive=1", "RoleId", true);
            this.rptList.DataSource = list;
            this.rptList.DataBind();
            AspNetPager1.RecordCount = pageCount;
        }


        protected void Button1_Click(object sender, EventArgs e)
        {
            MyBind();
        }

        protected void AspNetPager1_PageChanged(object sender, EventArgs e)
        {
            MyBind();
        }
    }
}
